package com.ibeeking.gmc.global.api.feign;

import com.ibeeking.gmc.global.api.feign.fallback.GlobalVariableFeignFallbackFactory;
import com.ibeeking.found.common.entity.GlobalVariableParam;
import com.ibeeking.found.common.entity.TenantVariableParam;
import com.ibeeking.nematos.utils.result.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author ibeeking
 */
@FeignClient(name = "gmc-global-g-server", contextId = "globalVariableFeignClient", path = "/g", fallbackFactory = GlobalVariableFeignFallbackFactory.class, decode404 = true)
public interface GlobalVariableFeignClient {

    /**
     * 修改全局变量
     *
     * @param param
     * @return code
     */
    @PostMapping(value = "/variable/feign/v1/addAndModifyGlobalVariable")
    ResponseResult<Boolean> addAndModifyGlobalVariable(@RequestBody GlobalVariableParam param);

    /**
     * 修改租户全局变量
     *
     * @param param
     * @return 返回
     */
    @PostMapping(value = "/variable/feign/v1/addAndModifyTenantVariable")
    ResponseResult<Boolean> addAndModifyTenantVariable(@RequestBody TenantVariableParam param);

}
